import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.Ignore;


public class LiczbaTest4 {
	protected Liczba liczba;

	public LiczbaTest4() {
	}

	@Before
	public void setUp() throws Exception {
		this.liczba = new Liczba();
	}

	@After
	public void tearDown() throws Exception {
		this.liczba = 121;
	}

	//@Test
	

	@Test(expected = NullPointerException.class)
	public void testMain() throws LiczbaException {
        System.out.println("main");
        String[] args = null;
        Liczba.main(args);
        assertEquals(null, args);
        System.out.println("String[] args == null");
    
        }
	

	@Test
    public void testZapisToBinary() throws Exception {
        int podstawa = 2;
        Liczba instance = new Liczba(3);
        String expResult = "11";
        String result = instance.zapis(podstawa);
        assertEquals(expResult, result);
        System.out.println("conversion to binary was successful");
	}
	
	@Test(timeout = 200)
	public void testPodstawaTwoToSixteen() throws Exception {
        Liczba instance = new Liczba();
        assertNotNull(instance);
        System.out.println("Newly created object Liczba is not null");
	}
	
	@Ignore
    public void testFalseAssertion() throws Exception {
	    int podstawa = 2;
	    Liczba instance = new Liczba(3);
	    String expResult = "11";
	    String result = instance.zapis(podstawa);
	    assertEquals(expResult, result);
	    assertFalse(podstawa > 16 && podstawa < 2);
	    System.out.println("It is false that podstawa is higher than 16 or lower than 2");
    }

}
